Patchwork [1,of,2,remotefilelog-ext,getfile-batching] fileserverclient: correctly use exception constructor

login
register
mail settings
Submitter Augie Fackler
Date Aug. 18, 2015, 8:07 p.m.
Message ID <1183fcaf20272ca5dbcc.1439928445@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/10232/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 18, 2015, 8:07 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1439926521 14400
#      Tue Aug 18 15:35:21 2015 -0400
# Node ID 1183fcaf20272ca5dbcc0c308e9e11b1c7c97093
# Parent  4607c177e80b376f63ca17bf8dda80339fc2a4c5
fileserverclient: correctly use exception constructor

We were passing one argument instead of 3.

Patch

diff --git a/remotefilelog/fileserverclient.py b/remotefilelog/fileserverclient.py
--- a/remotefilelog/fileserverclient.py
+++ b/remotefilelog/fileserverclient.py
@@ -45,7 +45,7 @@  def peersetup(ui, peer):
             yield {'file': file, 'node': node}, f
             code, data = f.value.split('\0', 1)
             if int(code):
-                raise error.LookupError(data)
+                raise error.LookupError(file, node, data)
             yield data
     peer.__class__ = remotefilepeer