

class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(
                self.args[0])
        else:
            return "Failed to authenticate with host."


class ExportError(Error, RuntimeError):
    pass


class FileNotFoundError(Error, FileNotFoundError):
    pass


class FetchError(FileNotFoundError):
    pass

from . import six

class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(
                self.args[0])
        else:
            return "Failed to authenticate with host."


class ExportError(Error, RuntimeError):
    pass


if six.PY2:
    class FileNotFoundError(Error, IOError):
        pass
else:
    class FileNotFoundError(Error, FileNotFoundError):
        pass


class FetchError(FileNotFoundError):
    pass

Fix py27 issue in error module.
Fix py27 issue in error module.

Inherit signac internal FileNotFoundError class from IOError
instead of FileNotFoundError in python 2.7.

- 
+ from . import six
  
  class Error(Exception):
      pass
  
  
  class ConfigError(Error, RuntimeError):
      pass
  
  
  class AuthenticationError(Error, RuntimeError):
  
      def __str__(self):
          if len(self.args) > 0:
              return "Failed to authenticate with host '{}'.".format(
                  self.args[0])
          else:
              return "Failed to authenticate with host."
  
  
  class ExportError(Error, RuntimeError):
      pass
  
  
+ if six.PY2:
+     class FileNotFoundError(Error, IOError):
+         pass
+ else:
- class FileNotFoundError(Error, FileNotFoundError):
+     class FileNotFoundError(Error, FileNotFoundError):
-     pass
+         pass
  
  
  class FetchError(FileNotFoundError):
      pass
  
Fix py27 issue in error module.
## Code Before:


class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(
                self.args[0])
        else:
            return "Failed to authenticate with host."


class ExportError(Error, RuntimeError):
    pass


class FileNotFoundError(Error, FileNotFoundError):
    pass


class FetchError(FileNotFoundError):
    pass

## Instruction:
Fix py27 issue in error module.
## Code After:
from . import six

class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(
                self.args[0])
        else:
            return "Failed to authenticate with host."


class ExportError(Error, RuntimeError):
    pass


if six.PY2:
    class FileNotFoundError(Error, IOError):
        pass
else:
    class FileNotFoundError(Error, FileNotFoundError):
        pass


class FetchError(FileNotFoundError):
    pass
