From 126f51b1d2b1391d14076c40464955b3450d8731 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Tue, 21 May 2019 17:04:14 +0200 Subject: [PATCH] Drop "imaging-tk" requirement Fixes #418 --- EDMarketConnector.py | 3 +-- README.md | 2 +- config.py | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index bc467df1..db8e139a 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -85,8 +85,7 @@ class AppWindow: if platform == 'win32': self.w.wm_iconbitmap(default='EDMarketConnector.ico') else: - from PIL import Image, ImageTk - self.w.tk.call('wm', 'iconphoto', self.w, '-default', ImageTk.PhotoImage(Image.open("EDMarketConnector.png"))) + self.w.tk.call('wm', 'iconphoto', self.w, '-default', tk.PhotoImage(file = 'EDMarketConnector.png')) self.theme_icon = tk.PhotoImage(data = 'R0lGODlhFAAQAMZQAAoKCQoKCgsKCQwKCQsLCgwLCg4LCQ4LCg0MCg8MCRAMCRANChINCREOChIOChQPChgQChgRCxwTCyYVCSoXCS0YCTkdCTseCT0fCTsjDU0jB0EnDU8lB1ElB1MnCFIoCFMoCEkrDlkqCFwrCGEuCWIuCGQvCFs0D1w1D2wyCG0yCF82D182EHE0CHM0CHQ1CGQ5EHU2CHc3CHs4CH45CIA6CIE7CJdECIdLEolMEohQE5BQE41SFJBTE5lUE5pVE5RXFKNaFKVbFLVjFbZkFrxnFr9oFsNqFsVrF8RsFshtF89xF9NzGNh1GNl2GP+KG////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEKAH8ALAAAAAAUABAAAAeegAGCgiGDhoeIRDiIjIZGKzmNiAQBQxkRTU6am0tPCJSGShuSAUcLoIIbRYMFra4FAUgQAQCGJz6CDQ67vAFJJBi0hjBBD0w9PMnJOkAiJhaIKEI7HRoc19ceNAolwbWDLD8uAQnl5ga1I9CHEjEBAvDxAoMtFIYCBy+kFDKHAgM3ZtgYSLAGgwkp3pEyBOJCC2ELB31QATGioAoVAwEAOw==') self.theme_minimize = tk.BitmapImage(data = '#define im_width 16\n#define im_height 16\nstatic unsigned char im_bits[] = {\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f,\n 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n') self.theme_close = tk.BitmapImage(data = '#define im_width 16\n#define im_height 16\nstatic unsigned char im_bits[] = {\n 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x1c, 0x38, 0x38, 0x1c, 0x70, 0x0e,\n 0xe0, 0x07, 0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x07, 0x70, 0x0e, 0x38, 0x1c,\n 0x1c, 0x38, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00 };\n') diff --git a/README.md b/README.md index c99ceb94..0f88cc04 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ Windows: Linux: -* Requires the Python “imaging-tk”, “iniparse”, and “requests” modules. On Debian-based systems install these with `sudo apt-get install python-imaging-tk python-iniparse python-requests` . +* Requires Python2.7 and the Python “iniparse”, and “requests” modules. On Debian-based systems install these with `sudo apt-get install python-iniparse python-requests` . * Run with `CLIENT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX ./EDMarketConnector.py` . Command-line diff --git a/config.py b/config.py index b6b020da..aab3d158 100644 --- a/config.py +++ b/config.py @@ -362,14 +362,14 @@ class Config: try: import keyring return keyring.get_password(self.identifier, account) - except ImportException: + except ImportError: return None def set_password(self, account, password): try: import keyring keyring.set_password(self.identifier, account, password) - except ImportException: + except ImportError: pass def delete_password(self, account):