def find_conf_file(pid):
 try:
  fd = open(('/proc/%s/cmdline' % pid))
 except IOError as e:
  utils.err(('Couchbase (pid %s) went away ? %s' % (pid, e)))
  return
 try:
  config = fd.read().split('config_path')[1].split('"')[1]
  return config
 finally:
  fd.close()

def find_conf_file ( pid ) : try : fd = open ( ( '/proc/%s/cmdline' % pid ) ) except IOError as e : utils . err ( ( 'Couchbase (pid %s) went away ? %s' % ( pid , e ) ) ) return try : config = fd . read ( ) . split ( 'config_path' ) [ 1 ] . split ( '"' ) [ 1 ] return config finally : fd . close ( )
returns config file for couchbase-server .