Skip to content

Commit

Permalink
[#367] Fixed the import statement for taskscheduler in `DisplayCAL.…
Browse files Browse the repository at this point in the history
…profile_loader.setup_profile_loader_task()`.
  • Loading branch information
eoyilmaz committed Oct 9, 2024
1 parent eccdfd8 commit 631e43e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DisplayCAL/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ def get_single_response(self):

def send_command(self, command):
# Automatically append newline (command end marker)
self.sendall(safe_str(command, "UTF-8") + "\n")
self.sendall(safe_str(command, "utf-8") + "\n")
4 changes: 2 additions & 2 deletions DisplayCAL/profile_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

def setup_profile_loader_task(exe, exedir, pydir):
if sys.getwindowsversion() >= (6,):
import taskscheduler
from DisplayCAL import taskscheduler

taskname = appname + " Profile Loader Launcher"

Expand Down Expand Up @@ -3037,7 +3037,7 @@ def _check_display_conf(self):
timestamp = time.time()
localtime = list(time.localtime(self._timestamp))
localtime[3:6] = 23, 59, 59
midnight = time.mktime(localtime) + 1
midnight = time.mktime(tuple(localtime)) + 1
if timestamp >= midnight:
self.reload_count = 0
self._timestamp = timestamp
Expand Down
2 changes: 1 addition & 1 deletion DisplayCAL/util_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def replace_control_chars(txt, replacement=" ", collapse=False):


def safe_basestring(obj, enc="utf-8", errors="replace"):
"""Return a unicode or string representation of obj
"""Return a string or bytes representation of obj.
Return obj if isinstance(obj, basestring). Otherwise, return unicode(obj),
string(obj), or repr(obj), whichever succeeds first.
Expand Down

0 comments on commit 631e43e

Please sign in to comment.