Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 5 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
View
2  src/facegraph/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-__version__ = '0.0.31'
+__version__ = '0.0.32'
from facegraph.canvas import decode_signed_request
from facegraph.api import Api
View
6 src/facegraph/fql.py
@@ -115,11 +115,7 @@ def fetch_json(cls, url, data=None):
code = response.get("error_code")
msg = response.get("error_msg")
args = response.get("request_args")
- e = GraphException(code, msg, args=args)
- if self.err_handler:
- self.err_handler(e)
- else:
- raise e
+ raise GraphException(code, msg, args=args)
return bunch.bunchify(response)
@staticmethod
View
14 src/facegraph/graph.py
@@ -474,17 +474,19 @@ def __init__(self, code, message, args=None, params=None, graph=None, method=Non
self.params = params
self.graph = graph
self.method = method
-
+
def __repr__(self):
return str(self)
-
+
def __str__(self):
- str = "%s, Node: %s" % (self.message, self.graph.url)
+ s = self.message
+ if self.graph:
+ s += "Node: %s" % self.graph.url
if self.params:
- str = "%s, Params: %s" % (str, self.params)
+ s += ", Params: %s" % self.params
if self.code:
- str = "(#%s) %s" % (str, self.code)
- return str
+ s += ", (%s)" % self.code
+ return s
def indent(string, prefix=' '):
"""Indent each line of a string with a prefix (default is 4 spaces)."""
View
1  tests/test_url_operations.py
@@ -157,6 +157,7 @@ def test_ids(self):
self.graph = self.graph.ids('a', 'b')
self.assertEquals(expected, self.graph.url)
+
class FQLTests(TestCase):
def setUp(self):
self.fql = FQL(access_token='abc123')

No commit comments for this range

Something went wrong with that request. Please try again.