Move the dummy session var up to convince PyCharm it will be there.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 29 Apr 2017 14:43:06 +0000 (10:43 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 29 Apr 2017 14:43:06 +0000 (10:43 -0400)
xonstat/views/submission.py

index e0ada1cc5bde5e4d3841243b0c8632deba2b0a4e..28026adb03eb71517d053d3d8f8dcc72caba54fa 100644 (file)
@@ -1048,10 +1048,10 @@ def submit_stats(request):
     """
     Entry handler for POST stats submissions.
     """
-    try:
-        # placeholder for the actual session
-        session = None
+    # placeholder for the actual session
+    session = None
 
+    try:
         log.debug("\n----- BEGIN REQUEST BODY -----\n" + request.body +
                   "----- END REQUEST BODY -----\n\n")