Index: sitescripts/subscriptions/subscriptionParser.py |
=================================================================== |
--- a/sitescripts/subscriptions/subscriptionParser.py |
+++ b/sitescripts/subscriptions/subscriptionParser.py |
@@ -231,20 +231,18 @@ def get_settings(): |
return settings |
def readSubscriptions(): |
repo = os.path.abspath(get_config().get('subscriptions', 'repository')) |
data = subprocess.check_output(['hg', 'archive', '-R', repo, '-r', 'default', '-t', 'tar', '-I', os.path.join(repo, '*.subscription'), '-']) |
result = {} |
tarFile = tarfile.open(mode='r:', fileobj=StringIO(data)) |
- fileInfo = tarFile.next() |
- while fileInfo: |
+ for fileInfo in tarFile: |
fileData = parseFile(fileInfo.name, codecs.getreader('utf8')(tarFile.extractfile(fileInfo))) |
- fileInfo = tarFile.next() |
if fileData.unavailable: |
continue |
if fileData.name in result: |
warn('Name %s is claimed by multiple files' % (fileData.name)) |
result[fileData.name] = fileData |
tarFile.close() |