mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
App.get_last_build() method to replace duplicated code
Look @mvdan, I added a method to the App class!
This commit is contained in:
parent
3db2c9869c
commit
b91cdffe17
2 changed files with 9 additions and 9 deletions
|
|
@ -239,6 +239,12 @@ class App():
|
|||
self.__dict__[k] = v
|
||||
self._modified.add(k)
|
||||
|
||||
def get_last_build(self):
|
||||
if len(self.builds) > 0:
|
||||
return self.builds[-1]
|
||||
else:
|
||||
return Build()
|
||||
|
||||
|
||||
TYPE_UNKNOWN = 0
|
||||
TYPE_OBSOLETE = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue