summaryrefslogtreecommitdiff
path: root/update_commited_patches.py
diff options
context:
space:
mode:
Diffstat (limited to 'update_commited_patches.py')
-rwxr-xr-xupdate_commited_patches.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/update_commited_patches.py b/update_commited_patches.py
index e295641..3f18efc 100755
--- a/update_commited_patches.py
+++ b/update_commited_patches.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import fcntl
import logging
@@ -37,7 +37,7 @@ def _update_commit(project, repo, commit, dryrun):
for i, patch in enumerate(patches):
if i == 0:
patch.state = accepted
- patch.commit_ref = commit.id
+ patch.commit_ref = commit.id.decode()
else:
patch.state = superseded
log.info('Updating patch %s, commit: %s, state: %s',
@@ -66,7 +66,7 @@ def _update_project(cb, repo_dir, project, commits, dryrun):
cb(project, repo, commit, dryrun)
except MemoryError as e:
log.error('Unable to process commit(%s) because of size: %s',
- commit.id, e)
+ commit.id, e)
except Exception as e:
log.error('Unable to process commit(%s): %s', commit.id, e)
@@ -117,7 +117,7 @@ if __name__ == '__main__':
_update_project(
cb, settings.REPO_DIR, p, args.commit_id, args.dryrun
)
- except:
+ except Exception:
log.exception('Error updating commits for: %s', p)
if not cb_constructor:
@@ -126,5 +126,5 @@ if __name__ == '__main__':
_update_project(
None, settings.REPO_DIR, p, args.commit_id, args.dryrun
)
- except:
+ except Exception:
log.exception('Error updating commits for: %s', p)