summaryrefslogtreecommitdiffstats
path: root/extras/snap_scheduler/snap_scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'extras/snap_scheduler/snap_scheduler.py')
-rwxr-xr-xextras/snap_scheduler/snap_scheduler.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/extras/snap_scheduler/snap_scheduler.py b/extras/snap_scheduler/snap_scheduler.py
index a20216d2492..fb3f446a4f1 100755
--- a/extras/snap_scheduler/snap_scheduler.py
+++ b/extras/snap_scheduler/snap_scheduler.py
@@ -372,16 +372,17 @@ def initialise_scheduler():
def syntax_checker(args):
ret = False
- if (len(args.jobname.split()) != 1):
- output("Invalid Jobname. Jobname should not be empty and should not contain \" \" character.")
- return ret
-
- if (len(args.volname.split()) != 1):
- output("Invalid Volname. Volname should not be empty and should not contain \" \" character.")
- return ret
+ if hasattr(args, 'jobname'):
+ if (len(args.jobname.split()) != 1):
+ output("Invalid Jobname. Jobname should not be empty and should not contain \" \" character.")
+ return ret
+ args.jobname=args.jobname.strip()
- args.jobname=args.jobname.strip()
- args.volname=args.volname.strip()
+ if hasattr(args, 'volname'):
+ if (len(args.volname.split()) != 1):
+ output("Invalid Volname. Volname should not be empty and should not contain \" \" character.")
+ return ret
+ args.volname=args.volname.strip()
ret = True
return ret