-
-def system(command,background=False,silent=False):
- if options.dry_run:
- print 'dry_run:',command
+# set a default timeout to 15 minutes - this should be plenty even for installations
+# call with timeout=None if the intention really is to wait until full completion
+def system(command, background=False, silent=False, dry_run=None, timeout=15*60):
+ dry_run = dry_run if dry_run is not None else getattr(options, 'dry_run', False)
+ if dry_run:
+ print('dry_run:', command)