]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
Add user agent to request that we are sending. v0.11
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Dec 2010 19:00:10 +0000 (20:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Dec 2010 19:00:10 +0000 (20:00 +0100)
fireinfo/__init__.py
sendprofile
setup.py

index d74f89788098ebd63664855fd59168926a5f04fc..fccd15902e5d9f949fbd9b8e16592eea3aad7e2d 100644 (file)
@@ -1,3 +1,5 @@
 #!/usr/bin/python
 
+__version__ = "0.11"
+
 from system import System
index e64f661370708dd253a2a8e4a294b10894a3c256..adae61de8a924f5dff3651288265c082b8d3e47a 100644 (file)
@@ -51,6 +51,7 @@ def send_profile(profile):
        request = urllib2.Request(PROFILE_URL % profile,
                data = urllib.urlencode({"profile" : json.dumps(profile)}),
        )
+       request.add_header("User-Agent", "fireinfo/%s" % fireinfo.__version__)
 
        # Set upstream proxy if we have one.
        # XXX this cannot handle authentication
index 75152cc04c20d9af0616f151accb821dc1bd358b..dd0076ac210f582c995c5e3465bef5dcc662b705 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,11 @@
 
 from distutils.core import setup, Extension
 
+import fireinfo
+
 setup(
        name = "fireinfo",
-       version = "0.10",
+       version = fireinfo.__version__,
        description = "Hardware information gathering library.",
        author = "IPFire.org Team",
        author_email = "info@ipfire.org",