def _fence(self, *args): # always include the overridden fencepy directory # no logging, since that breaks tests in Windows (with overridden fencepy dir) sys.argv = ['fencepy', '-F', self.fdir, '-s'] + list(args) ret = fencepy.fence() sys.argv = ORIGINAL_ARGV return ret
import fencepy if __name__ == '__main__': fencepy.fence()
def _fence_no_options(self, *args): # help doesn't work with any options sys.argv = ['fencepy'] + list(args) ret = fencepy.fence() sys.argv = ORIGINAL_ARGV return ret