Advertisement
kotoroshinoto

Its broken

Jul 9th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.63 KB | None | 0 0
  1. def parseSubJob(subjobopt,clusterjob):
  2.     #subjobvars={};
  3.     commasplit=subjobopt.split(",");
  4.     for commaItem in commasplit:
  5.         eqsplit=commaItem.split("=")
  6.         print("split on equal sign: %s" % eqsplit)
  7.         if (len(eqsplit)!=2):
  8.             raise PipelineError("[PipelineTemplateGenerator.parseVars] invalid argument syntax! should have 2 elements separated by '=', have: %d" % len(eqsplit));
  9.         attrib_name=eqsplit[0]
  10.         attrib_val=eqsplit[1]
  11.         print("attrib_name:")
  12.         print(attrib_name)
  13.         print("attrib_val:")
  14.         print(attrib_val)
  15.         if attrib_name is "order_after":
  16.             print("found order_after!!!");
  17.             print("parsing: %s" % attrib_val);
  18.             if ':' in attrib_val:
  19.                 arr=attrib_val.split(":");
  20.                 print("split order after: %s" % arr);
  21.                 clusterjob.order_after.append(arr);
  22.             else:
  23.                 print("order after: %s" % attrib_val);
  24.                 clusterjob.order_after.append(attrib_val);
  25.         elif attrib_name is "cmd":
  26.             print("found cmd!!!");
  27.             print("split cmd: %s" % attrib_val);
  28.             clusterjob.cmd.append(attrib_val);
  29.         else:
  30.             print("found %s!!!" % attrib_name)
  31.             setattr(clusterjob, attrib_name, attrib_val)
  32.         if clusterjob.module is None:
  33.             clusterjob.module=BiotoolsSettings.getValue("MODULEFILE")
  34.         if clusterjob.directory is None:
  35.             clusterjob.directory=BiotoolsSettings.getValue("CURDIR")
  36.         if clusterjob.queue is None:
  37.             clusterjob.queue=BiotoolsSettings.getValue("JOBQUEUE")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement