Commit 13a6316f authored by Michal Čihař's avatar Michal Čihař

Properly handle when subclass does not implement something

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 362996da
...@@ -36,16 +36,18 @@ class Repository(object): ...@@ -36,16 +36,18 @@ class Repository(object):
_last_revision = None _last_revision = None
_last_remote_revision = None _last_remote_revision = None
_cmd = 'false' _cmd = 'false'
_cmd_last_revision = [] _cmd_last_revision = None
_cmd_last_remote_revision = [] _cmd_last_remote_revision = None
_cmd_clone = 'clone' _cmd_clone = 'clone'
_cmd_update_remote = [] _cmd_update_remote = None
def __init__(self, path): def __init__(self, path):
self.path = path self.path = path
@classmethod @classmethod
def _popen(cls, args, cwd=None): def _popen(cls, args, cwd=None):
if args is None:
raise RepositoryException('Not supported functionality')
args.insert(0, cls._cmd) args.insert(0, cls._cmd)
process = subprocess.Popen( process = subprocess.Popen(
args, args,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment