mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-06 06:53:32 +00:00
change from python to python3
This commit is contained in:
parent
5ebbaba6f1
commit
d3da277d4f
15 changed files with 75 additions and 73 deletions
|
|
@ -74,7 +74,7 @@ def processAlarm(typ, freq, data):
|
|||
# timestamp, to make sure, that all plugins use the same time
|
||||
data['timestamp'] = int(time.time())
|
||||
# Go to all plugins in pluginList
|
||||
for pluginName, plugin in globalVars.pluginList.items():
|
||||
for pluginName, plugin in list(globalVars.pluginList.items()):
|
||||
# if enabled use RegEx-filter
|
||||
if globalVars.config.getint("BOSWatch","useRegExFilter"):
|
||||
from includes import regexFilter
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ def convertToUnicode(inputString = ""):
|
|||
pass
|
||||
|
||||
# 2. Check if inputString is unicode...
|
||||
if isinstance(inputString, unicode):
|
||||
if isinstance(inputString, str):
|
||||
logging.debug("-- unicode")
|
||||
return inputString
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ def convertToUTF8(inputString = ""):
|
|||
pass
|
||||
|
||||
# 2. Check if inputString is unicode...
|
||||
if isinstance(inputString, unicode):
|
||||
if isinstance(inputString, str):
|
||||
logging.debug("-- unicode")
|
||||
# ... then return it as UTF-8
|
||||
uft8String = decodedString.encode('UTF-8')
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import logging # Global logger
|
|||
import imp
|
||||
import os
|
||||
|
||||
from ConfigParser import NoOptionError # we need this exception
|
||||
from configparser import NoOptionError # we need this exception
|
||||
from includes import globalVars # Global variables
|
||||
|
||||
def loadPlugins():
|
||||
|
|
|
|||
|
|
@ -22,40 +22,40 @@ def printHeader(args):
|
|||
@return: nothing
|
||||
"""
|
||||
try:
|
||||
print " ____ ____ ______ __ __ __ "
|
||||
print " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ "
|
||||
print " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ "
|
||||
print " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / "
|
||||
print " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ "
|
||||
print " German BOS Information Script "
|
||||
print " by Bastian Schroll, Jens Herrmann "
|
||||
print ""
|
||||
print "SW Version: "+globalVars.versionNr
|
||||
print "Branch: "+globalVars.branch
|
||||
print "Build Date: "+globalVars.buildDate
|
||||
print ""
|
||||
print(" ____ ____ ______ __ __ __ ")
|
||||
print(" / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ ")
|
||||
print(" / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ ")
|
||||
print(" / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ")
|
||||
print(" /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ ")
|
||||
print(" German BOS Information Script ")
|
||||
print(" by Bastian Schroll, Jens Herrmann ")
|
||||
print("")
|
||||
print(("SW Version: "+globalVars.versionNr))
|
||||
print(("Branch: "+globalVars.branch))
|
||||
print(("Build Date: "+globalVars.buildDate))
|
||||
print("")
|
||||
|
||||
print "Frequency: "+args.freq
|
||||
print "Device-ID: "+str(args.device)
|
||||
print "Error in PPM: "+str(args.error)
|
||||
print "Active Demods: "+str(len(args.demod))
|
||||
print(("Frequency: "+args.freq))
|
||||
print(("Device-ID: "+str(args.device)))
|
||||
print(("Error in PPM: "+str(args.error)))
|
||||
print(("Active Demods: "+str(len(args.demod))))
|
||||
if "FMS" in args.demod:
|
||||
print "- FMS"
|
||||
print("- FMS")
|
||||
if "ZVEI" in args.demod:
|
||||
print "- ZVEI"
|
||||
print("- ZVEI")
|
||||
if "POC512" in args.demod:
|
||||
print "- POC512"
|
||||
print("- POC512")
|
||||
if "POC1200" in args.demod:
|
||||
print "- POC1200"
|
||||
print("- POC1200")
|
||||
if "POC2400" in args.demod:
|
||||
print "- POC2400"
|
||||
print "Squelch: "+str(args.squelch)
|
||||
print "Gain: "+str(args.gain)
|
||||
print("- POC2400")
|
||||
print(("Squelch: "+str(args.squelch)))
|
||||
print(("Gain: "+str(args.gain)))
|
||||
if args.verbose:
|
||||
print "Verbose Mode!"
|
||||
print("Verbose Mode!")
|
||||
if args.test:
|
||||
print "Test Mode!"
|
||||
print ""
|
||||
print("Test Mode!")
|
||||
print("")
|
||||
except:
|
||||
logging.error("cannot display shell header")
|
||||
logging.debug("cannot display shell header", exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue