Newer
Older
exporter / job.py
import os.path

class Job:
  next_id = 0
  def __init__(self, input, type = 1, scale = 1, base = None):
    if not os.path.isfile(input):
      raise Exception("Failed: couldn't open " + input)
    self.id = next_id
    next_id += 1
    self.input = abspath(input)
    self.base = base if base is not None else os.path.split(input)[0]
    if not file_in_path(self.input, self.base):
      raise Exception("Failed: " + input + " is not in base dir " + self.base)
    self.type = type
    self.scale = scale
    self.done = False