summaryrefslogtreecommitdiff
path: root/modules/ships.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ships.py')
-rw-r--r--modules/ships.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/ships.py b/modules/ships.py
index 0a296ca..8dfe41a 100644
--- a/modules/ships.py
+++ b/modules/ships.py
@@ -1,4 +1,4 @@
-from . import tasks
+from . import task_type
from .database import cursor, conn
@@ -13,15 +13,15 @@ class Ship:
cursor.execute("SELECT task, params FROM ships WHERE symbol = ?", (self.symbol,))
row = cursor.fetchone()
if row is None:
- cursor.execute("INSERT INTO ships (symbol, task, params) VALUES (?, ?, ?)", (self.symbol, tasks.IDLE, None))
+ cursor.execute("INSERT INTO ships (symbol, task, params) VALUES (?, ?, ?)", (self.symbol, task_type.IDLE, None))
conn.commit()
- self.task = tasks.IDLE
+ self.task = task_type.IDLE
else:
self.task = row[0]
def set_task(self, task):
self.task = task
- if task != tasks.ERROR:
+ if task != task_type.ERROR:
cursor.execute("UPDATE ships SET task = ? WHERE symbol = ?", (task, self.symbol))
conn.commit()