summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-06 02:30:28 +0100
committernfnty <git@nfnty.se>2017-02-06 02:30:28 +0100
commit9a619526f472cce3997b2aa89c13532cf8f005e1 (patch)
treee1eb8523806138b247bcd085c7203df9ed9a9930
parent41478b10c5a0bace85c74bc7388b3818c8f86ab4 (diff)
downloadranger-9a619526f472cce3997b2aa89c13532cf8f005e1.tar.gz
core.main: Catch the right traceback
-rw-r--r--README.md2
-rw-r--r--doc/cheatsheet.svg4
-rw-r--r--doc/ranger.14
-rw-r--r--doc/ranger.pod2
-rw-r--r--doc/rifle.12
-rw-r--r--ranger/core/main.py13
6 files changed, 17 insertions, 10 deletions
diff --git a/README.md b/README.md
index 051212ce..7e8de804 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ About
 * License:     GNU General Public License Version 3
 * Website:     http://ranger.nongnu.org/
 * Download:    http://ranger.nongnu.org/ranger-stable.tar.gz
-* Bug reports: https://github.com/hut/ranger/issues
+* Bug reports: https://github.com/ranger/ranger/issues
 * git clone    http://git.sv.gnu.org/r/ranger.git
 
 
diff --git a/doc/cheatsheet.svg b/doc/cheatsheet.svg
index aff7b6cd..d84ef87f 100644
--- a/doc/cheatsheet.svg
+++ b/doc/cheatsheet.svg
@@ -4089,7 +4089,7 @@
          style="font-size:15px">git clone</tspan></text>
     <a
        id="a5531"
-       xlink:href="https://github.com/hut/ranger"
+       xlink:href="https://github.com/ranger/ranger"
        style="fill:#0000ff"
        transform="translate(245,-305.00002)">
       <text
@@ -4103,7 +4103,7 @@
            x="280"
            id="tspan5529"
            sodipodi:role="line"
-           style="font-size:15px">https://github.com/hut/ranger</tspan></text>
+           style="font-size:15px">https://github.com/ranger/ranger</tspan></text>
     </a>
     <rect
        style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
diff --git a/doc/ranger.1 b/doc/ranger.1
index 16abc635..89acdd78 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.8.1" "2017-02-05" "ranger manual"
+.TH RANGER 1 "ranger-1.8.1" "2017-02-06" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -1461,7 +1461,7 @@ copy, run:
 \&\fIrifle\fR\|(1)
 .SH "BUGS"
 .IX Header "BUGS"
-Report bugs here: <https://github.com/hut/ranger/issues>
+Report bugs here: <https://github.com/ranger/ranger/issues>
 .PP
 Please include as much relevant information as possible.  For the most
 diagnostic output, run ranger like this: \f(CW\*(C`PYTHONOPTIMIZE= ranger \-\-debug\*(C'\fR
diff --git a/doc/ranger.pod b/doc/ranger.pod
index f77a6030..9fc7e144 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -1591,7 +1591,7 @@ rifle(1)
 
 =head1 BUGS
 
-Report bugs here: L<https://github.com/hut/ranger/issues>
+Report bugs here: L<https://github.com/ranger/ranger/issues>
 
 Please include as much relevant information as possible.  For the most
 diagnostic output, run ranger like this: C<PYTHONOPTIMIZE= ranger --debug>
diff --git a/doc/rifle.1 b/doc/rifle.1
index 07875bc2..feafb659 100644
--- a/doc/rifle.1
+++ b/doc/rifle.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RIFLE 1"
-.TH RIFLE 1 "rifle-1.8.1" "2017-02-05" "rifle manual"
+.TH RIFLE 1 "rifle-1.8.1" "2017-02-06" "rifle manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 444f0287..0189aa2b 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -161,23 +161,29 @@ def main(
             profile = pstats.Stats(profile_file, stream=sys.stderr)
         else:
             fm.loop()
+
     except Exception:  # pylint: disable=broad-except
         import traceback
+        ex_traceback = traceback.format_exc()
+
         exit_msg += '''\
 ranger version: {0}
 Python version: {1}
 Locale: {2}
 '''.format(ranger.__version__, sys.version.split()[0],
            '.'.join(str(s) for s in locale.getlocale()))
+
         try:
             exit_msg += "Current file: '{0}'\n".format(fm.thisfile.path)
-        except AttributeError:
+        except Exception:  # pylint: disable=broad-except
             pass
+
         exit_msg += '''
 {0}
 ranger crashed. Please report this traceback at:
-https://github.com/hut/ranger/issues
-'''.format(traceback.format_exc())
+https://github.com/ranger/ranger/issues
+'''.format(ex_traceback)
+
         exit_code = 1
 
     except SystemExit as ex:
@@ -187,6 +193,7 @@ https://github.com/hut/ranger/issues
                 exit_code = 1
             else:
                 exit_code = ex.code
+
     finally:
         if exit_msg:
             LOG.critical(exit_msg)