diff --git a/api.py b/api.py deleted file mode 100644 index 9b58724..0000000 --- a/api.py +++ /dev/null @@ -1,12 +0,0 @@ -import requests -import os, getpass, re, pickle, getpass, json - -class Session(): - def __init__(self): - self.client = requests.Session() - - def api_request(self, url='/', method='get', **kwargs): - return json.loads(getattr(self.client, method)('https://api.warframe.market/v1' + url, **kwargs).text) - - - diff --git a/tui.py b/tui.py index a6cfaa3..41f27c7 100644 --- a/tui.py +++ b/tui.py @@ -1,12 +1,16 @@ -from requests.exceptions import ConnectionError +import requests import curses, curses.textpad -import subprocess, sys +import subprocess, sys, json + +class Session(): + def __init__(self): + self.client = requests.Session() + + def api_request(self, url='/', method='get', **kwargs): + return json.loads(getattr(self.client, method)('https://api.warframe.market/v1' + url, **kwargs).text) -from api import Session -def check_exit(x): - pass class GUI(): def __init__(self, root, h, w, y, x): @@ -158,6 +162,6 @@ try: curses.wrapper(main) except KeyboardInterrupt: print('Exiting') -except ConnectionError: +except requests.exceptions.ConnectionError: print("No Internet") sys.exit(1)