def compute(self):
        input_file = self.get_input("file")
        output_path = self.get_input("outputPath")
        full_path = output_path.name

        if os.path.isfile(full_path):
            if self.get_input('overwrite'):
                try:
                    os.remove(full_path)
                except OSError, e:
                    msg = ('Could not delete existing path "%s" '
                           '(overwrite on)' % full_path)
                    raise ModuleError(self, msg)
            else:
                raise ModuleError(self,
                                  "Could not copy file to '%s': file already "
                                  "exists")

        try:
            vistrails.core.system.link_or_copy(input_file.name, full_path)
        except OSError, e:
            msg = (full_path, e) % "Could not create file '%s': %s"
            raise ModuleError(self, msg)

        if (self.has_input("publishFile") and
            self.get_input("publishFile") or 
            not self.has_input("publishFile")):
            if self.moduleInfo.has_key('extra_info'):
                if self.moduleInfo['extra_info'].has_key('pathDumpCells'):
                    folder = self.moduleInfo['extra_info']['pathDumpCells']
                    base_fname = os.path.basename(full_path)
                    (base_fname, file_extension) = os.path.splitext(base_fname)
                    base_fname = os.path.join(folder, base_fname)
                    # make a unique filename
                    filename = base_fname + file_extension
                    counter = 2
                    while os.path.exists(filename):
                        filename = base_fname + "_%d%s" % (counter,
                                                           file_extension)
                        counter += 1
                    try:
                        vistrails.core.system.link_or_copy(input_file.name, filename)
                    except OSError, e:
                        msg = "Could not publish file '%s' \n   on  '%s':" % (
                                full_path, filename)
                        # I am not sure whether we should raise an error
                        # I will just print a warning for now (Emanuele)
                        debug.warning("%s" % msg, e)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/basic_modules.py/FileSink.compute/swapped operands of `%`