# # # patch "mtn.py" # from [baac0cadf56fd7639ff48b4b9f0828e1db05d70d] # to [4087439b9f969d35845212e8d8f125902b93bd9b] # ============================================================ --- mtn.py baac0cadf56fd7639ff48b4b9f0828e1db05d70d +++ mtn.py 4087439b9f969d35845212e8d8f125902b93bd9b @@ -54,15 +54,10 @@ class Author(str): str.__init__(v) self.obj_type = "author" -class Runner(object): - def __init__(self, monotone, database): - self.database = database - self.base_command = [monotone, "--db=%s" % pipes.quote(database)] - packet_header_re = re.compile(r'^(\d+):([lm]):(\d+):') import web -class Automate(Runner): +class Automate(object): """Runs commands via a particular monotone process. This process is started the first time run() is called, and stopped when this class instance is deleted or the stop() @@ -71,8 +66,9 @@ class Automate(Runner): If an error occurs, the monotone process may need to be stopped and a new one created. """ - def __init__(self, *args, **kwargs): - Runner.__init__(*[self] + list(args), **kwargs) + def __init__(self, monotone, database, **kwargs): + self.database = database + self.base_command = [monotone, "--db=%s" % pipes.quote(database)] self.lock = threading.Lock() self.process = None self.running_mtime = None