Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes #68

Merged
merged 2 commits into from
Dec 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/app_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import traceback

from apps import zero_app
from helpers import setup_logger
from ui import Printer, Menu

from helpers import setup_logger
logger = setup_logger(__name__, "info")


Expand Down Expand Up @@ -200,10 +200,10 @@ def get_zeroapp_class_in_module(module_):
for item in module_content:
class_ = getattr(module_, item)
try:
if issubclass(class_, zero_app.ZeroApp):
if issubclass(class_, zero_app.ZeroApp) and item != 'ZeroApp':
return class_
except Exception as e:
pass # todo : check why isinstance(class_, ClassType)==False in python2
pass # not a class : ignore
return None


Expand Down
3 changes: 1 addition & 2 deletions output/drivers/pygame_emulator_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
"""

import luma.emulator.device

from helpers import setup_logger

# ignore PIL debug messages

logging.getLogger("PIL").setLevel(logging.ERROR)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the import error, but loses a feature - namely, PIL library logging output suppression (which is pointed out in the comment right above). Sorry for not pointing this out earlier =)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we don't even use the resulting logger - so, removed


logger = setup_logger(__name__)

def get_pygame_emulator_device(width=128, height=64):
Expand Down