original_docstring: delete a mirror by specifying its (exact) identifier string)
docstring: delete a mirror by specifying its (exact) identifier string)
docstring_tokens: delete a mirror by specifying its ( exact ) identifier string )
code: def delete_mirror(conn, mirror):
      """delete a mirror by specifying its (exact) identifier string)"""
      try:
          m = conn.Server.select(conn.Server.q.identifier == mirror)[0]
      except IndexError:
          raise mb.mberr.MirrorNotFoundError(mirror)
  
      query = """SELECT mirr_del_byid(%d, id) FROM filearr WHERE %s = ANY(mirrors)""" \
                     % (m.id, m.id)
      conn.Server._connection.queryAll(query)
  
      conn.Server.delete(m.id)
code_tokens: def delete_mirror ( conn , mirror ) : try : m = conn . Server . select ( conn . Server . q . identifier == mirror ) [ 0 ] except IndexError : raise mb . mberr . MirrorNotFoundError ( mirror ) query = """SELECT mirr_del_byid(%d, id) FROM filearr WHERE %s = ANY(mirrors)""" % ( m . id , m . id ) conn . Server . _connection . queryAll ( query ) conn . Server . delete ( m . id )
short_docstring: delete a mirror by specifying its (exact) identifier string)
short_docstring_tokens: delete a mirror by specifying its ( exact ) identifier string )
comment: """delete a mirror by specifying its (exact) identifier string)"""