Commit 20875f7d24401e3eadade576a73223203342e59f
1 parent
df64047a
Exists in
master
and in
1 other branch
Moved method items() to User, since it isn't specific for LocalSystem.
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
src/user.py
@@ -27,6 +27,9 @@ class User: | @@ -27,6 +27,9 @@ class User: | ||
27 | self.item_score = item_score | 27 | self.item_score = item_score |
28 | self.demo_profile = demo_profile | 28 | self.demo_profile = demo_profile |
29 | 29 | ||
30 | + def items(self): | ||
31 | + return self.item_score.keys() | ||
32 | + | ||
30 | class LocalSystem(User): | 33 | class LocalSystem(User): |
31 | """ """ | 34 | """ """ |
32 | def __init__(self): | 35 | def __init__(self): |
@@ -35,6 +38,3 @@ class LocalSystem(User): | @@ -35,6 +38,3 @@ class LocalSystem(User): | ||
35 | for p in dpkg_output.replace('install','\t').split(): | 38 | for p in dpkg_output.replace('install','\t').split(): |
36 | item_score[p] = 1 | 39 | item_score[p] = 1 |
37 | User.__init__(self,item_score) | 40 | User.__init__(self,item_score) |
38 | - | ||
39 | - def items(self): | ||
40 | - return self.item_score.keys() |