Commit c54b4c9c authored by André Sintzoff's avatar André Sintzoff
Browse files

qqueue: fix Python 2.4 compatibility issue

In Python 2.4, with statement is not recognized.
parent 97441cf12263
......@@ -240,8 +240,11 @@ class QQueueDialog(QDialog):
sf = '/.hg/patches-%s/series' % q
sf = self.repo.root + sf
if os.path.exists(sf):
with open(sf, 'r') as f:
f = open(sf, 'r')
try:
patches = f.read().splitlines()
finally:
f.close()
for p in patches:
item = QListWidgetItem(hglib.tounicode(p))
item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment