Skip to content

Commit c0e009f

Browse files
committed
Bumping up version to 0.5.3.
1 parent 57d1299 commit c0e009f

File tree

5 files changed

+36
-15
lines changed

5 files changed

+36
-15
lines changed

BlocklyLogger.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66

77
import os
88
import logging
9-
from sys import platform
9+
import platform
10+
1011

1112
__author__ = 'Jim Ewald'
1213

14+
1315
# Platform constants
14-
PLATFORM_LINUX = 'linux2'
15-
PLATFORM_MACOS = 'darwin'
16-
PLATFORM_WINDOWS = 'win32'
16+
PLATFORM_LINUX = 'Linux'
17+
PLATFORM_MACOS = 'MacOS'
18+
PLATFORM_DARWIN = 'MacOS'
19+
PLATFORM_WINDOWS = 'Windows'
1720

1821
# Default log path for each platform
1922
DEFAULT_PATH_MACOS = '/Library/Logs/Parallax'
@@ -23,6 +26,8 @@
2326
# Resulting path for log file
2427
path = None
2528

29+
loglevel = logging.DEBUG
30+
2631

2732
def init(filename = 'BlocklyPropClient.log'):
2833
global path
@@ -42,11 +47,12 @@ def emit(self, record):
4247
disable_filelogging = False
4348

4449
# Set correct log file location
45-
if platform == PLATFORM_MACOS:
50+
system = platform.system()
51+
if (system == PLATFORM_MACOS) or (system == PLATFORM_DARWIN):
4652
logfile_name = __set_macos_logpath(filename)
47-
elif platform == PLATFORM_WINDOWS:
53+
elif system == PLATFORM_WINDOWS:
4854
logfile_name = __set_windows_logpath(filename)
49-
elif platform == PLATFORM_LINUX:
55+
elif system == PLATFORM_LINUX:
5056
logfile_name = __set_linux_logpath(filename)
5157

5258
# Verify that we have a valid location
@@ -58,11 +64,11 @@ def emit(self, record):
5864

5965
# Create a logger
6066
logger = logging.getLogger('blockly')
61-
logger.setLevel(logging.DEBUG)
67+
logger.setLevel(loglevel)
6268

6369
# create a console handler for error-level events
6470
console = logging.StreamHandler()
65-
console.setLevel(logging.ERROR)
71+
console.setLevel(loglevel)
6672

6773
# create a logging format
6874
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
@@ -72,7 +78,7 @@ def emit(self, record):
7278
# Log file is overwritten each time the app runs.
7379
if not disable_filelogging:
7480
handler = logging.FileHandler(logfile_name, mode='w')
75-
handler.setLevel(logging.DEBUG)
81+
handler.setLevel(loglevel)
7682
handler.setFormatter(formatter)
7783
logger.addHandler(handler)
7884

BlocklyPropClient.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
22
BlocklyProp Client
33
4+
0.5.3 February 22, 2017
5+
- Correct error in path to propeller-load executable.
6+
- Detect condition where serial port has disappeared
7+
- Correct error where browser request for specific port
8+
speed was disregarded.
9+
410
"""
511
import Tkinter as tk
612
import ttk as ttk
@@ -23,20 +29,29 @@
2329
__author__ = 'Michel & Vale'
2430

2531
PORT = 6009
26-
VERSION = "0.5.2"
2732

33+
# -----------------------------------------------------------------------
34+
# NOTE:
35+
#
36+
# Please verify that the version number in the local about.txt and the
37+
# ./package/win0resources/blocklypropclient-installer.iss
38+
# -----------------------------------------------------------------------
39+
VERSION = "0.5.3"
2840

2941

3042
# Enable logging for functions outside of the class definition
31-
module_logger = logging.getLogger('blockly')
43+
module_logger = None
3244

3345

3446
class BlocklyPropClient(tk.Tk):
3547
def __init__(self, *args, **kwargs):
48+
global module_logger
3649

3750
# Enable application logging
3851
BlocklyLogger.init()
3952
self.logger = logging.getLogger('blockly.main')
53+
module_logger = logging.getLogger('blockly')
54+
4055
self.logger.info('Creating logger.')
4156

4257
BlocklyHardware.init()

PropellerLoad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self):
3535
exit(1)
3636

3737
self.appdir = os.getcwd()
38-
self.appdir = os.path.dirname(sys.argv[0])
38+
# self.appdir = os.path.dirname(sys.argv[0])
3939

4040
def get_ports(self):
4141
self.logger.info('Getting ports')

about.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CurrentVersion: v0.5.2
1+
CurrentVersion: v0.5.3
22

33
Contributors:
44
- Michel Lampo

package/blocklypropclient-installer.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "BlocklyPropClient"
5-
#define MyAppVersion "0.5.2"
5+
#define MyAppVersion "0.5.3"
66
#define MyAppPublisher "Parallax, Inc."
77
#define MyAppURL "http://blockly.parallax.com/"
88
#define MyAppExeName "BlocklyPropClient.exe"

0 commit comments

Comments
 (0)