P4Python trouble deleting client/Workspace

476 Views Asked by At

I am trying to delete a client but I get the following error : "Identifiers too long. Must not be longer than 1024 bytes of UTF-8." My code goes smth like this:

  try: 
  client=p4.fetch_client("-S", stream_root, client_name)
  client._root = client_root
  client._client = client_name
  p4.save_client(client)
  p4.client = client_name
  p4.run_sync("-f", root_path) 
  ......
  p4.run("client", "-d", client)
  logging.info("Workspace" + client + "deleted") 

Any idea if my lines are correct or what could be missing?

1

There are 1 best solutions below

2
On

client in your script is the entire client spec. The argument to p4 client -d is just the client name:

p4.run("client", "-d", client_name)