After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676280 - Traceback when running exernal tools (remove trailing space)
Traceback when running exernal tools (remove trailing space)
Status: RESOLVED OBSOLETE
Product: gedit-plugins
Classification: Other
Component: General
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-17 21:15 UTC by Matěj Cepl
Modified: 2020-11-24 10:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add-missing-source-parameter (3.32 KB, patch)
2012-08-26 17:31 UTC, Rubén Caro
needs-work Details | Review

Description Matěj Cepl 2012-05-17 21:15:39 UTC
wycliff:bugs (master) $ Traceback (most recent call last):
  • File "/usr/lib64/gedit/plugins/externaltools/capture.py", line 197 in on_output
    self.process_read_buffer()
  • File "/usr/lib64/gedit/plugins/externaltools/capture.py", line 156 in process_read_buffer
    if source == self.pipe.stdout:
NameError: global name 'source' is not defined
Traceback (most recent call last):
  • File "/usr/lib64/gedit/plugins/externaltools/capture.py", line 197 in on_output
    self.process_read_buffer()
  • File "/usr/lib64/gedit/plugins/externaltools/capture.py", line 156 in process_read_buffer
    if source == self.pipe.stdout:
NameError: global name 'source' is not defined

Comment 1 Rubén Caro 2012-08-26 17:31:45 UTC
Created attachment 222486 [details] [review]
Add-missing-source-parameter

All in file 'capture.py'. 'process_read_buffer' on line 154 was called without parameters twice from inside 'on_output' on lines 191 and 197. But it referenced the 'source' variable that is out of scope because it is defined inside 'on_output'. This fix is
just to pass the 'source' variable as a parameter to 'process_read_buffer'.
Comment 2 Paolo Borelli 2012-08-26 23:09:10 UTC
Review of attachment 222486 [details] [review]:

Thanks for the patch, a couple of coding style nitpicks below.

Also please reword the commit message to not mention line numbers, they are not important information when checking the history and if one wants to see where things changed he may as well check the diff

::: plugins/externaltools/tools/capture.py
@@ -30,3 @@
     CAPTURE_BOTH   = 0x03
     CAPTURE_NEEDS_SHELL = 0x04
-    

please attach the whitespace changes in a separate patch

@@ +152,3 @@
             return False
 
+    def process_read_buffer(self,source):

missing space after the comma
Comment 3 Rubén Caro 2012-08-27 17:33:30 UTC
Sorry. Next time I'll try to be more careful.

Thanks.
Comment 4 Sébastien Wilmet 2020-11-24 10:18:51 UTC
Mass-closing of all gedit-plugins bugzilla tickets.

Special "code" to find again all those gedit-plugins bugzilla tickets that were open before the mass-closing:

2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3

By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements.

We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.