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 e0ada1c..28026ad 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")