commit 22e25e0b83af9dcd15a24d14530bf2b4f229521e
Author: Frédéric Péters <fpeters@0d.be>
Date:   Tue May 25 10:23:10 2010 +0200

    Do not fail if json Python module is not available
    
    Fallback to old simplejson module if present, and options that require
    the json module (create extension and performance) if absent.

diff --git a/src/gnome-shell.in b/src/gnome-shell.in
index c1a439d..f15b0cf 100644
--- a/src/gnome-shell.in
+++ b/src/gnome-shell.in
@@ -3,7 +3,13 @@
 
 import atexit
 import datetime
-import json
+try:
+    import json
+except ImportError:
+    try:
+        import simplejson as json
+    except ImportError:
+        json = None
 import optparse
 import os
 import random
@@ -548,9 +554,15 @@ if args:
     parser.print_usage()
     sys.exit(1)
 
-if options.create_extension:
-    import json
+if options.create_extension and json is None:
+    print 'The Python json module is required to create a new GNOME Shell extension'
+    sys.exit(1)
+
+if options.perf and json is None:
+    print 'The Python json module is required for performance tests'
+    sys.exit(1)
 
+if options.create_extension:
     print
     print '''Name should be a very short (ideally descriptive) string.
 Examples are: "Click To Focus",  "Adblock", "Shell Window Shrinker".
