Changeset a4a463e5514c…
Parent 97441cf12263…
by
Changes to one file · Browse files at a4a463e5514c Showing diff from parent 97441cf12263 Diff from another changeset...
@@ -240,8 +240,11 @@ 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)
|
Loading...