Bug 31527 - error: pop from empty list
Summary: error: pop from empty list
Status: NEW
Alias: None
Product: papyon
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: papyon-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 09:48 UTC by Riccardo (c10ud)
Modified: 2010-11-10 12:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Riccardo (c10ud) 2010-11-10 09:48:54 UTC
sometimes it happens (happened to me in case of 400 errors in roaming)


diff --git a/papyon/gnet/protocol/HTTP.py b/papyon/gnet/protocol/HTTP.py
index f455f6c..aade093 100644
--- a/papyon/gnet/protocol/HTTP.py
+++ b/papyon/gnet/protocol/HTTP.py
@@ -136,7 +136,8 @@ class HTTP(gobject.GObject):
         #        self._outgoing_queue[0].headers['Host'] = response.headers['Location']
         #        self._setup_transport()
         #        return
-        self._outgoing_queue.pop(0) # pop the request from the queue
+        if len(self._outgoing_queue) > 0:
+            self._outgoing_queue.pop(0) # pop the request from the queue
         if response.status >= 400:
             logger.error("Received error code %i (%s) from %s:%i" %
                 (response.status, response.reason, self._host, self._port))
Comment 1 Riccardo (c10ud) 2010-11-10 12:08:16 UTC
happened to me while receiving a nice 400 error when doing content roaming. however the patch seems fine


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.