Skip to content

Commit

Permalink
Make OAuth path hack platform independent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed Jul 21, 2012
1 parent 876e174 commit 79aa9ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions requests/_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
from oauthlib.common import extract_params
from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)
except ImportError:
path = os.path.abspath('/'.join(__file__.split('/')[:-1]+['packages']))
directory = os.path.dirname(__file__)
path = os.path.join(directory, 'packages')
sys.path.insert(0, path)
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)
from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)

0 comments on commit 79aa9ed

Please sign in to comment.