def get(self, ride_id): try: return self.get_single_ride(ride_id) except psycopg2.DatabaseError as e: if con: print(e) con.rollback() return self.get_single_ride(ride_id) except psycopg2.InterfaceError as Ie: print(Ie) return self.get_single_ride(ride_id)
def get(self): try: return self.get_ride_offers() except psycopg2.DatabaseError as e: if con: print(e) con.rollback() return self.get_ride_offers() except psycopg2.InterfaceError as Ie: print(Ie) return self.get_ride_offers()
def post(self): try: return login() except psycopg2.DatabaseError as e: print(e) if con: con.rollback() login() sys.exit(1) except psycopg2.InterfaceError as Ie: print(Ie) return login()
def put(self, rideId, requestId): try: return self.accept_or_reject_ridrequest(rideId, requestId) except psycopg2.DatabaseError as e: if con: con.rollback() print(e) self.accept_or_reject_ridrequest(rideId, requestId) sys.exit(1) except psycopg2.InterfaceError as Ie: print(Ie) return self.accept_or_reject_ridrequest(rideId, requestId)
def get(self, rideId): try: return self.get_rideoffer_requests(rideId) except psycopg2.DatabaseError as e: if con: con.rollback() print(e) self.get_rideoffer_requests(rideId) sys.exit(1) except psycopg2.InterfaceError as Ie: print(Ie) return self.get_rideoffer_requests(rideId)
def post(self): try: return create_user() except psycopg2.DatabaseError as e: if con: con.rollback() print(e) create_user() sys.exit(1) except psycopg2.InterfaceError as Ie: print(Ie) return create_user()
def post(self): try: return self.insert_ride_offers() except psycopg2.DatabaseError as e: if con: con.rollback() print(e) self.insert_ride_offers() sys.exit(1) except psycopg2.InterfaceError as Ie: print(Ie) return self.insert_ride_offers()