import time
from StringIO import StringIO
-
def revertStandardError():
"""Move stderr to stdout, and return the contents of the old stderr."""
errio = sys.stderr
if not operation:
operation = 'list'
- #main(operation, u, fields)
- import profile
- profile.run('main(operation, u, fields)', 'log-'+operation)
-
+ if os.getenv("SIPB_XEN_PROFILE"):
+ import profile
+ profile.run('main(operation, u, fields)', 'log-'+operation)
+ else:
+ main(operation, u, fields)