Revision 6b88d711 devflow/versioning.py

b/devflow/versioning.py
44 44
import os
45 45
import re
46 46
import sys
47
import pprint
48 47

  
49 48
from distutils import log  # pylint: disable=E0611
50 49

  
......
336 335
    return debian_version(b, v, mode)
337 336

  
338 337

  
339
def user_info():
340
    import getpass
341
    import socket
342
    return "%s@%s" % (getpass.getuser(), socket.getfqdn())
343

  
344

  
345 338
def update_version():
346 339
    """Generate or replace version files
347 340

  
......
361 354
    b = get_base_version(v)
362 355
    mode = utils.get_build_mode()
363 356
    version = python_version(b, v, mode)
364
    vcs_info_dict = dict(v._asdict())  # pylint: disable=W0212
365 357
    vcs_info = """{
366 358
    'branch': '%s',
367 359
    'revid': '%s',
......
370 362
"""__version__ = "%(version)s"
371 363
__version_info__ = %(version_info)s
372 364
__version_vcs_info__ = %(vcs_info)s
373
__version_user_info__ = "%(user_info)s"
365
__version_user_email__ = "%(user_email)s"
366
__version_user_name__ = "%(user_name)s"
374 367
""" % dict(version=version, version_info=version.split("."),
375 368
           vcs_info=vcs_info,
376
           user_info=user_info())
369
           user_email=v.email,
370
           user_name=v.name)
377 371

  
378 372
    for _pkg_name, pkg_info in config['packages'].items():
379 373
        version_filename = pkg_info['version_file']

Also available in: Unified diff