-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (23 loc) · 875 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: UTF-8 -*-
from libs.icons import Icons
from libs.status import Status
from libs.installer import Installer
from libs.downloader import Downloader
import logging
class Main(object):
def __init__(self):
logging.basicConfig(level=logging.DEBUG)
self.status = Status()
self._downloader = Downloader(logging, self.status)
self._installer = Installer(logging, self.status)
self._icons = Icons(logging, self.status)
def execute(self):
if self._downloader.is_downloaded():
downloaded_file = self._downloader.downloaded_file
if self._downloader.should_install and\
not self.status.is_installed:
self._installer.install(downloaded_file)
self._icons.configure_icons(self.status.get_version())
if __name__ == "__main__":
m = Main()
m.execute()