Revision aa00e32c

b/snf-pithos-backend/pithos/backends/util.py
120 120

  
121 121
        try:
122 122
            fd = conn.connection.connection.fileno()
123
            r, w, x = select([fd], (), (), 0)
124
            if r:
125
                conn.close()
123
        except AttributeError:
124
            # probably sqlite, assume success
125
            pass
126
        else:
127
            try:
128
                r, w, x = select([fd], (), (), 0)
129
                if r:
130
                    conn.close()
131
                    return False
132
            except:
133
                print_exc()
126 134
                return False
127
        except:
128
            print_exc()
129
            return False
130 135

  
131 136
        return True
132 137

  

Also available in: Unified diff