[odrs-web/production] trivial: Make pylint happy with cron.py
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/production] trivial: Make pylint happy with cron.py
- Date: Fri, 25 May 2018 14:56:10 +0000 (UTC)
commit 76841aed538e251a15ceb0a1f40265abfe19d3a5
Author: Richard Hughes <richard hughsie com>
Date: Fri May 25 15:55:56 2018 +0100
trivial: Make pylint happy with cron.py
cron.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/cron.py b/cron.py
index 8a189d6..9554da3 100755
--- a/cron.py
+++ b/cron.py
@@ -4,11 +4,12 @@
# Copyright (C) 2016-2018 Richard Hughes <richard hughsie com>
# Licensed under the GNU General Public License Version 3
+from __future__ import print_function
+
import json
-import os
import sys
-from app.db import Database
+from app.db import Database, CursorError
if __name__ == '__main__':
@@ -29,7 +30,7 @@ if __name__ == '__main__':
item[app_id] = ratings
except CursorError as e:
print(str(e))
- os.exit(1)
+ sys.exit(1)
# dump to file
dat = json.dumps(item, sort_keys=True, indent=4, separators=(',', ': '))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]