diff --git a/gnupg/gnupg.py b/gnupg/gnupg.py
index <HASH>..<HASH> 100644
--- a/gnupg/gnupg.py
+++ b/gnupg/gnupg.py
@@ -180,7 +180,7 @@ class GPG(GPGBase):
         else:
             log.warn("No 'default_key' given! Using first key on secring.")
 
-        if isinstance(data, file):
+        if hasattr(data, 'read'):
             result = self._sign_file(data, **kwargs)
         elif not _is_stream(data):
             stream = _make_binary_stream(data, self._encoding)
File and IO handling in Py3 is different than Py2

Instead of checking whether data isinstance of 'file', then we check that
it is file-like _enough_ to be treated as a file (i.e. it hasattr 'read').