Skip to content

Commit

Permalink
Unicode everywhere...
Browse files Browse the repository at this point in the history
  • Loading branch information
lekeno committed Mar 26, 2018
1 parent 4223aff commit 0569b0e
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions edr/edrclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ def __init__(self):
def loud_audio_feedback(self):
config.set("EDRAudioFeedbackVolume", "loud")
self.AUDIO_FEEDBACK.loud()
self.status = "loud audio cues."
self.status = u"loud audio cues."

def soft_audio_feedback(self):
config.set("EDRAudioFeedbackVolume", "soft")
self.AUDIO_FEEDBACK.soft()
self.status = "soft audio cues."
self.status = u"soft audio cues."

def apply_config(self):
c_email = config.get("EDREmail")
Expand Down Expand Up @@ -124,7 +124,7 @@ def check_version(self):
self.motd = version_range["motd"]

if version_range is None:
self.status = "check for version update has failed."
self.status = u"check for version update has failed."
return

if self.is_obsolete(version_range["min"]):
Expand Down Expand Up @@ -193,9 +193,9 @@ def player_name(self, name):
def login(self):
self.server.logout()
if self.server.login(self.email, self.password):
self.status = "authenticated."
self.status = u"authenticated."
return True
self.status = "not authenticated."
self.status = u"not authenticated."
return False

def is_logged_in(self):
Expand Down Expand Up @@ -256,14 +256,14 @@ def prefs_ui(self, parent):
variable=self._audio_feedback).grid(padx=10, row=17, sticky=tk.W)

if self.server.is_authenticated():
self.status = "authenticated."
self.status = u"authenticated."
else:
self.status = "not authenticated."
self.status = u"not authenticated."

return frame

def __status_update_pending(self):
self.status = "mandatory EDR update!" if self.mandatory_update else "please update EDR!"
self.status = u"mandatory EDR update!" if self.mandatory_update else "please update EDR!"
if self.status_ui:
self.status_ui.underline = True
self.status_ui.url = "https://github.com/lekeno/edr/releases/latest"
Expand Down Expand Up @@ -385,7 +385,7 @@ def novel_enough_traffic_report(self, sighted_cmdr, report):
def who(self, cmdr_name, autocreate=False):
profile = self.cmdr(cmdr_name, autocreate, check_inara_server=True)
if not profile is None:
self.status = "got info about {}".format(cmdr_name)
self.status = u"got info about {}".format(cmdr_name)
EDRLOG.log(u"Who {} : {}".format(cmdr_name, profile.short_profile()), "INFO")
legal = self.edrlegal.summarize_recents(profile.cid)
if legal:
Expand All @@ -399,13 +399,13 @@ def who(self, cmdr_name, autocreate=False):
def blip(self, cmdr_name, blip):
cmdr_id = self.cmdr_id(cmdr_name)
if cmdr_id is None:
self.status = "no cmdr id (contact)."
self.status = u"no cmdr id (contact)."
EDRLOG.log(u"Can't submit blip (no cmdr id for {}).".format(cmdr_name), "ERROR")
return

profile = self.cmdr(cmdr_name)
if profile and (self.player.name != cmdr_name) and profile.is_dangerous():
self.status = "{} is bad news.".format(cmdr_name)
self.status = u"{} is bad news.".format(cmdr_name)
if self.novel_enough_blip(cmdr_id, blip, cognitive = True):
self.__warning(u"Warning!", [profile.short_profile()])
self.cognitive_blips_cache.set(cmdr_id, blip)
Expand All @@ -415,7 +415,7 @@ def blip(self, cmdr_name, blip):
EDRLOG.log("Skipping warning since a warning was recently shown.", "INFO")

if not self.novel_enough_blip(cmdr_id, blip):
self.status = "skipping blip (not novel enough)."
self.status = u"skipping blip (not novel enough)."
EDRLOG.log(u"Blip is not novel enough to warrant reporting", "INFO")
return True

Expand All @@ -426,15 +426,15 @@ def blip(self, cmdr_name, blip):

success = self.server.blip(cmdr_id, blip)
if success:
self.status = "blip reported for {}.".format(cmdr_name)
self.status = u"blip reported for {}.".format(cmdr_name)
self.blips_cache.set(cmdr_id, blip)

return success

def scanned(self, cmdr_name, scan):
cmdr_id = self.cmdr_id(cmdr_name)
if cmdr_id is None:
self.status = "no cmdr id (scan)."
self.status = u"no cmdr id (scan)."
EDRLOG.log(u"Can't submit scan (no cmdr id for {}).".format(cmdr_name), "ERROR")
return

Expand All @@ -444,7 +444,7 @@ def scanned(self, cmdr_name, scan):
bounty = edentities.EDBounty(scan["bounty"]) if scan["bounty"] else None
if profile and (self.player.name != cmdr_name):
if profile.is_dangerous():
self.status = "{} is bad news.".format(cmdr_name)
self.status = u"{} is bad news.".format(cmdr_name)
details = [profile.short_profile()]
if bounty:
details.append(u"Wanted for {} cr".format(edentities.EDBounty(scan["bounty"]).pretty_print()))
Expand All @@ -454,7 +454,7 @@ def scanned(self, cmdr_name, scan):
details.append(legal)
self.__warning(u"Warning!", details)
elif self.intel_even_if_clean or (scan["wanted"] and bounty.is_significant()):
self.status = "Intel for cmdr {}.".format(cmdr_name)
self.status = u"Intel for cmdr {}.".format(cmdr_name)
details = [profile.short_profile()]
if bounty:
details.append(u"Wanted for {} cr".format(edentities.EDBounty(scan["bounty"]).pretty_print()))
Expand All @@ -468,7 +468,7 @@ def scanned(self, cmdr_name, scan):
self.cognitive_scans_cache.set(cmdr_id, scan)

if not self.novel_enough_scan(cmdr_id, scan):
self.status = "skipping scan (not novel enough)."
self.status = u"skipping scan (not novel enough)."
EDRLOG.log(u"Scan is not novel enough to warrant reporting", "INFO")
return True

Expand All @@ -479,7 +479,7 @@ def scanned(self, cmdr_name, scan):

success = self.server.scanned(cmdr_id, scan)
if success:
self.status = "scan reported for {}.".format(cmdr_name)
self.status = u"scan reported for {}.".format(cmdr_name)
self.scans_cache.set(cmdr_id, scan)

return success
Expand All @@ -492,7 +492,7 @@ def traffic(self, star_system, traffic):

sigthed_cmdr = traffic["cmdr"]
if not self.novel_enough_traffic_report(sigthed_cmdr, traffic):
self.status = "traffic report isn't novel enough."
self.status = u"traffic report isn't novel enough."
EDRLOG.log(u"Traffic report is not novel enough to warrant reporting", "INFO")
return True

Expand All @@ -504,7 +504,7 @@ def traffic(self, star_system, traffic):

success = self.server.traffic(sid, traffic)
if success:
self.status = "traffic reported."
self.status = u"traffic reported."
self.traffic_cache.set(sigthed_cmdr, traffic)

return success
Expand Down Expand Up @@ -593,7 +593,7 @@ def untag_cmdr(self, cmdr_name, tag):
def where(self, cmdr_name):
report = self.edroutlaws.where(cmdr_name)
if report:
self.status = "got info about {}".format(cmdr_name)
self.status = u"got info about {}".format(cmdr_name)
self.__intel(u"Intel for {}".format(cmdr_name), report)
else:
EDRLOG.log(u"Where {} : no info".format(cmdr_name), "INFO")
Expand All @@ -606,7 +606,7 @@ def outlaws(self):
self.__sitrep(u"Recently Sighted Outlaws", [u"No outlaws sighted in the last {}".format(edtime.EDTime.pretty_print_timespan(self.edroutlaws.timespan))])
return False

self.status = "recently sighted outlaws"
self.status = u"recently sighted outlaws"
EDRLOG.log(u"Got recently sighted outlaws", "INFO")
self.__sitrep(u"Recently Sighted Outlaws", outlaws_report)

Expand Down

0 comments on commit 0569b0e

Please sign in to comment.