Total Complexity | 3 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import git |
||
5 | class Updater(object): |
||
6 | def __init__(self): |
||
7 | self.repo = git.Repo(os.path.dirname(os.path.abspath(__file__))) |
||
8 | self.head = self.repo.remotes.origin |
||
9 | |||
10 | def check(self): |
||
11 | self.head.fetch() |
||
12 | diff = self.head.diff() |
||
13 | |||
14 | return bool(diff) |
||
15 | |||
16 | def update(self): |
||
17 | self.head.pull() |