mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-31 23:59:05 +00:00
Fix string equality checks (#267)
This commit is contained in:
parent
8bd80d046a
commit
bf5c8dd531
@ -30,7 +30,7 @@ import syncplay
|
|||||||
from syncplay.messages import getMissingStrings
|
from syncplay.messages import getMissingStrings
|
||||||
|
|
||||||
missingStrings = getMissingStrings()
|
missingStrings = getMissingStrings()
|
||||||
if missingStrings is not None and missingStrings is not "":
|
if missingStrings is not None and missingStrings != "":
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
||||||
|
|
||||||
@ -718,4 +718,4 @@ info = dict(
|
|||||||
)
|
)
|
||||||
|
|
||||||
sys.argv.extend(['py2exe'])
|
sys.argv.extend(['py2exe'])
|
||||||
setup(**info)
|
setup(**info)
|
||||||
|
@ -135,7 +135,7 @@ class SyncplayClient(object):
|
|||||||
|
|
||||||
if constants.DEBUG_MODE and constants.WARN_ABOUT_MISSING_STRINGS:
|
if constants.DEBUG_MODE and constants.WARN_ABOUT_MISSING_STRINGS:
|
||||||
missingStrings = getMissingStrings()
|
missingStrings = getMissingStrings()
|
||||||
if missingStrings is not None and missingStrings is not "":
|
if missingStrings is not None and missingStrings != "":
|
||||||
self.ui.showDebugMessage("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
self.ui.showDebugMessage("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
||||||
|
|
||||||
def initProtocol(self, protocol):
|
def initProtocol(self, protocol):
|
||||||
|
@ -320,7 +320,7 @@ class ConfigDialog(QtWidgets.QDialog):
|
|||||||
try:
|
try:
|
||||||
self.lastCheckedForUpdates = settings.value("lastCheckedQt", None)
|
self.lastCheckedForUpdates = settings.value("lastCheckedQt", None)
|
||||||
if self.lastCheckedForUpdates:
|
if self.lastCheckedForUpdates:
|
||||||
if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "":
|
if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] != "":
|
||||||
if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"):
|
if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"):
|
||||||
self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z")
|
self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user