Commits

Ali Gholami Rudi  committed 3a0637b

interface: don't fail when using self.resource when no project is open

  • Participants
  • Parent commits 783765b

Comments (0)

Files changed (1)

File ropemode/interface.py

     def _get_resource(self, filename=None):
         if filename is None:
             filename = self.env.filename()
-        if filename is None:
+        if filename is None or self.project is None:
             return
         resource = libutils.path_to_resource(self.project, filename, 'file')
         return resource