def __init__(self, args, cmd_list, sep, cmd_map): CommandQueue.__init__(self, cmd_list, sep, cmd_map) self.args = args self.cmd_line = None self.init_blkdev = None self.init_vol = None self.blkdev = None self.volume = None
def run(self): self.img = self.args.image_file try: # main command loop exit_code = CommandQueue.run(self) except FSError as e: cmd = "'%s'" % " ".join(self.cmd_line) print(cmd, "FSError:", str(e)) exit_code = 3 except IOError as e: cmd = "'%s'" % " ".join(self.cmd_line) print(cmd, "IOError:", str(e)) exit_code = 4 finally: # close rdisk if self.rdisk != None: self.rdisk.close() if self.args.verbose: print("closing rdisk:", self.img) # close blkdev if self.blkdev != None: self.blkdev.close() if self.args.verbose: print("closing image:", self.img) return exit_code
def run(self): self.img = self.args.image_file try: # main command loop exit_code = CommandQueue.run(self) except FSError as e: cmd = "'%s'" % " ".join(self.cmd_line) print cmd, "FSError:", e exit_code = 3 except IOError as e: cmd = "'%s'" % " ".join(self.cmd_line) print cmd, "IOError:", e exit_code = 4 finally: # close volume if self.volume != None: self.volume.close() if self.args.verbose: print "closing volume:", self.img # close blkdev if self.blkdev != None: self.blkdev.close() if self.args.verbose: print "closing image:", self.img return exit_code
def run(self): self.img = self.args.image_file try: # main command loop exit_code = CommandQueue.run(self) except FSError as e: cmd = "'%s'" % " ".join(self.cmd_line) print cmd,"FSError:",e exit_code = 3 except IOError as e: cmd = "'%s'" % " ".join(self.cmd_line) print cmd,"IOError:",e exit_code = 4 finally: # close volume if self.volume != None: self.volume.close() if self.args.verbose: print "closing volume:",self.img # close blkdev if self.blkdev != None: self.blkdev.close() if self.args.verbose: print "closing image:",self.img return exit_code
def run(self): self.img = self.args.image_file try: # main command loop exit_code = CommandQueue.run(self) except FSError as e: cmd = "'%s'" % " ".join(self.cmd_line) print(cmd, "FSError:", e) exit_code = 3 except IOError as e: cmd = "'%s'" % " ".join(self.cmd_line) print(cmd, "IOError:", e) exit_code = 4 finally: self._close_all() return exit_code
def __init__(self, args, cmd_list, sep, cmd_map): CommandQueue.__init__(self, cmd_list, sep, cmd_map) self.args = args self.blkdev = None self.rdisk = None