pbs.py (1916:fe8d4e92c0a7) | pbs.py (1928:b75ae11a5e8f) |
---|---|
1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 144 unchanged lines hidden (view full) --- 153 154 if self.priority: 155 self.cmd.append('-p' + self.priority) 156 157 if self.queue: 158 self.cmd.append('-q' + self.queue) 159 160 if self.afterok: | 1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 144 unchanged lines hidden (view full) --- 153 154 if self.priority: 155 self.cmd.append('-p' + self.priority) 156 157 if self.queue: 158 self.cmd.append('-q' + self.queue) 159 160 if self.afterok: |
161 self.cmd.append('-Wdepend=afterok:%s' % self.after) | 161 self.cmd.append('-Wdepend=afterok:%s' % self.afterok) |
162 163 self.cmd.extend(args) 164 self.script = script 165 self.command = ' '.join(self.cmd + [ self.script ]) 166 167 def do(self): 168 pbs = MyPOpen(self.cmd + [ self.script ]) 169 self.result = pbs.fromchild.read() 170 ec = pbs.wait() 171 172 if ec != 0 and self.pbshost: 173 cmd = ' '.join(self.cmd + [ '-' ]) 174 cmd = [ 'ssh', '-x', self.pbshost, cmd ] 175 self.command = ' '.join(cmd) 176 ssh = MyPOpen(cmd, input = self.script) 177 self.result = ssh.fromchild.read() 178 ec = ssh.wait() 179 180 return ec | 162 163 self.cmd.extend(args) 164 self.script = script 165 self.command = ' '.join(self.cmd + [ self.script ]) 166 167 def do(self): 168 pbs = MyPOpen(self.cmd + [ self.script ]) 169 self.result = pbs.fromchild.read() 170 ec = pbs.wait() 171 172 if ec != 0 and self.pbshost: 173 cmd = ' '.join(self.cmd + [ '-' ]) 174 cmd = [ 'ssh', '-x', self.pbshost, cmd ] 175 self.command = ' '.join(cmd) 176 ssh = MyPOpen(cmd, input = self.script) 177 self.result = ssh.fromchild.read() 178 ec = ssh.wait() 179 180 return ec |