Skip to content

Commit 53294a4

Browse files
Merge pull request #471 from ixcat/windows_jobs
datajoint/jobs.py: use platform.node() for windows (fix for #470)
2 parents fe5f749 + 602a152 commit 53294a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

datajoint/jobs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from _decimal import Decimal
22
from .hash import key_hash
33
import os
4+
import platform
45
import pymysql
56
from .base_relation import BaseRelation
67
from . import DataJointError
@@ -78,7 +79,7 @@ def reserve(self, table_name, key):
7879
table_name=table_name,
7980
key_hash=key_hash(key),
8081
status='reserved',
81-
host=os.uname().nodename,
82+
host=platform.node(),
8283
pid=os.getpid(),
8384
connection_id=self.connection.connection_id,
8485
key=self.packable_or_none(key),
@@ -113,7 +114,7 @@ def error(self, table_name, key, error_message, error_stack=None):
113114
self.insert1(
114115
dict(job_key,
115116
status="error",
116-
host=os.uname().nodename,
117+
host=platform.node(),
117118
pid=os.getpid(),
118119
connection_id=self.connection.connection_id,
119120
user=self._user,

0 commit comments

Comments
 (0)