[Blends-commit] [SCM] website branch, master, updated. bb627ae68d3886b637c2499727ea13eeb89c0562
Ole Streicher
olebole at debian.org
Sun Mar 20 13:20:36 UTC 2016
The following commit has been merged in the master branch:
commit bb627ae68d3886b637c2499727ea13eeb89c0562
Author: Ole Streicher <olebole at debian.org>
Date: Sun Mar 20 14:20:27 2016 +0100
Make vcs_found a boolean
diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 4ce2415..ba9a352 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -729,7 +729,7 @@ class DependantPackage:
# because Enhances relations are quite seldom
self.properties['stable_testing_version'] = [] # (release, version) tuples where release is codename for stable and testing
self.properties['version'] = [] # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
- self.vcs_found = 0 # we need a flag to store the fact whether Vcs information of a package is in UDD
+ self.vcs_found = False # we need a flag to store the fact whether Vcs information of a package is in UDD
self.desc = {} # Prospective packages should have a description ...
# ... which could be copied to (or from if exists)
# WNPP bug and finally can be used for packaging
@@ -1094,12 +1094,12 @@ class TaskDependencies:
# if we are seeking for ddpo source packages we have to make sure that
# no duplication occures
- hasnot = 1
+ found = False
for hasdep in self.dependencies[dep.properties['pkgstatus']]:
if hasdep.pkg == dep.pkg:
- hasnot = 0
+ found = True
break
- if hasnot == 1:
+ if not found:
self.dependencies[dep.properties['pkgstatus']].append(dep)
def GetTaskDependencies(self, source=0):
@@ -1231,7 +1231,7 @@ class TaskDependencies:
% stanza['homepage'])
elif key.lower() in ('vcs-svn', 'vcs-git'):
if dep is not None:
- if dep.vcs_found == 1:
+ if dep.vcs_found:
fields_obsolete.append(key)
continue
vcs = dep.properties.setdefault('vcs', {})
@@ -1249,7 +1249,7 @@ class TaskDependencies:
dep.properties['pkgstatus'] = 'pkgvcs'
elif key.lower() == 'vcs-browser':
if dep is not None:
- if dep.vcs_found == 1:
+ if dep.vcs_found:
fields_obsolete.append(key)
continue
vcs = dep.properties.setdefault('vcs', {})
@@ -1279,7 +1279,7 @@ class TaskDependencies:
% (key, stanza[key.lower()]))
elif key == 'License':
if dep is not None:
- if dep.vcs_found == 1 and key.lower() in dep.properties:
+ if dep.vcs_found and key.lower() in dep.properties:
fields_obsolete.append(key)
continue
dep.properties[key.lower()] = stanza[key.lower()]
@@ -1309,7 +1309,7 @@ class TaskDependencies:
% (key, stanza[key.lower()]))
elif key == 'WNPP':
if dep is not None:
- if dep.vcs_found == 1 and key.lower() in dep.properties:
+ if dep.vcs_found and key.lower() in dep.properties:
fields_obsolete.append(key)
continue
wnpp = stanza['wnpp'].strip()
@@ -1762,7 +1762,7 @@ class TaskDependencies:
# There is only one line returned by this query
row = RowDictionaries(curs)[0]
# If some information about Vcs is found in the database make sure it is ignored from tasks file
- self.vcs_found = 1
+ self.vcs_found = True
for prop in row.keys():
if row[prop]:
self.properties[prop] = row[prop]
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index b62df3f..0ce6682 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -686,7 +686,7 @@ class DependantPackage:
# because Enhances relations are quite seldom
self.properties['stable_testing_version'] = [] # (release, version) tuples where release is codename for stable and testing
self.properties['version'] = [] # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
- self.vcs_found = 0 # we need a flag to store the fact whether Vcs information of a package is in UDD
+ self.vcs_found = False # we need a flag to store the fact whether Vcs information of a package is in UDD
self.debtags = {} # list of {'tag', 'value'} dictionary containing debtag information
self.screenshots = [] # list of {'version', 'url'} dictionary containing screenshot information
self.icon = None # URL of small screenshot icon
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list