Changeset 4ed10ae for fedd/fedd_experiment_control.py
- Timestamp:
- Nov 14, 2008 5:13:10 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- afa43a8
- Parents:
- 2dafa0c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_experiment_control.py
r2dafa0c r4ed10ae 320 320 except pickle.PicklingError, e: 321 321 self.log.error("Pickling problem: %s" % e) 322 except TypeError, e: 323 self.log.error("Pickling problem (TypeError): %s" % e) 322 324 323 325 # Call while holding self.state_lock … … 441 443 self.log.error("[start_segment]: can't open /dev/null: %s" %e) 442 444 443 status = Popen(cmd, stdout=PIPE, stderr=dev_null) 444 for line in status.stdout: 445 m = state_re.match(line) 446 if m: state = m.group(1) 447 else: 448 m = no_exp_re.match(line) 449 if m: state = "none" 450 rv = status.wait() 445 if self.debug: 446 state = 'swapped' 447 rv = 0 448 else: 449 status = Popen(cmd, stdout=PIPE, stderr=dev_null) 450 for line in status.stdout: 451 m = state_re.match(line) 452 if m: state = m.group(1) 453 else: 454 m = no_exp_re.match(line) 455 if m: state = "none" 456 rv = status.wait() 451 457 452 458 # If the experiment is not present the subcommand returns a non-zero … … 766 772 else: return None 767 773 768 769 774 def get_access(self, tb, nodes, user, tbparam): 770 775 """ … … 835 840 except ZSI.ParseException, e: 836 841 raise service_error(service_error.req, 837 "Bad format message (XMLRPC??): %s" % 838 str(e)) 839 r = unpack_soap(resp) 842 "Bad format message (XMLRPC??): %s" % str(e)) 843 except ZSI.FaultException, e: 844 resp = e.fault.detail[0] 845 846 # Again, weird incompatibilities rear their head. userRoles, which are 847 # restricted strings, seem to be encoded by ZSI as non-unicode strings 848 # in a way that confuses the pickling and XMLRPC sending systems. 849 # Explicitly unicoding them seems to fix this, though it concerns me 850 # some. It may be that these things are actually a ZSI string 851 # subclass, and the character encoding is not the major issue. In any 852 # case, making all the subclasses of basestring into unicode strings 853 # unifies the response format and solves the problem. 854 r = make_unicode(unpack_soap(resp)) 840 855 841 856 if r.has_key('RequestAccessResponseBody'): … … 844 859 raise service_error(service_error.proxy, 845 860 "Bad proxy response") 846 847 861 848 862 e = r['emulab'] … … 868 882 if key: 869 883 tbparam[tb][key]= a['value'] 870 884 871 885 def remote_splitter(self, uri, desc, master): 872 886
Note: See TracChangeset
for help on using the changeset viewer.